package com.atguigu.yygh.order.service;

import com.atguigu.yygh.model.order.OrderInfo;
import com.atguigu.yygh.vo.order.OrderCountQueryVo;
import com.atguigu.yygh.vo.order.OrderQueryVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * @author zr
 * @date 2021/12/21 16:48
 */
public interface OrderService extends IService<OrderInfo> {
    /**
     * 创建订单
     *
     * @param patientId
     * @param scheduleId
     * @return
     */
    Long saveOrder(long patientId, String scheduleId);

    /**
     * 根据订单id查询订单详情
     *
     * @param orderId
     * @return
     */
    OrderInfo getOrder(String orderId);

    /**
     * 订单条件查询带分页
     *
     * @param orderInfoPage
     * @param orderQueryVo
     */
    void selectPage(Page<OrderInfo> orderInfoPage, OrderQueryVo orderQueryVo);

    /**
     * 获取订单详情
     *
     * @param id
     * @return
     */
    Map<String, Object> show(Long id);

    /**
     * 取消预约
     *
     * @param orderId
     * @return
     */
    Boolean cancelOrder(Long orderId);

    /**
     * 就诊通知
     */
    void patientTips();

    /**
     * 获取订单统计数据
     *
     * @param orderCountQueryVo
     * @return
     */
    Map<String, Object> getCountMap(OrderCountQueryVo orderCountQueryVo);

}
